package com.devframe.sysbase.model.base;

import java.io.Serializable;

import com.devframe.sysbase.model.*;

/**
 * This is an object that contains data related to the T_SYS_PARAM_GROUP table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="T_SYS_PARAM_GROUP"
 */

public abstract class BaseTSysParamGroup  implements Serializable {

	public static String REF = "TSysParamGroup";
	public static String PROP_SORT_NO = "sortNo";
	public static String PROP_CODE = "code";
	public static String PROP_NAME = "name";


	// constructors
	public BaseTSysParamGroup () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTSysParamGroup (java.lang.String code) {
		this.setCode(code);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String code;

	// fields
	private java.lang.String name;
	private java.lang.Long sortNo;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="CODE"
     */
	public java.lang.String getCode () {
		return code;
	}

	/**
	 * Set the unique identifier of this class
	 * @param code the new ID
	 */
	public void setCode (java.lang.String code) {
		this.code = code;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: NAME
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: NAME
	 * @param name the NAME value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: SORT_NO
	 */
	public java.lang.Long getSortNo () {
		return sortNo;
	}

	/**
	 * Set the value related to the column: SORT_NO
	 * @param sortNo the SORT_NO value
	 */
	public void setSortNo (java.lang.Long sortNo) {
		this.sortNo = sortNo;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof TSysParamGroup)) return false;
		else {
			TSysParamGroup tSysParamGroup = (TSysParamGroup) obj;
			if (null == this.getCode() || null == tSysParamGroup.getCode()) return false;
			else return (this.getCode().equals(tSysParamGroup.getCode()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getCode()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getCode().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}